package com.qf.mapper;

import com.qf.entity.MallGoodsTemplate;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>title: com.qf.mapper</p>
 * <p>Company: wendao</p>
 * author zhuximing
 * date 2021/9/17
 * description:
 */
public interface GoodsTemplateMapper {

    @Select("select * from mall_goods_template")
    public List<MallGoodsTemplate> findByPage(MallGoodsTemplate mallGoodsTemplate);

    @Insert("insert into mall_goods_template (brands,spec,name) values (#{brands},#{spec},#{name})")
    int save(MallGoodsTemplate mallGoodsTemplate);
    @Update("update mall_goods_template set brands = #{brands}, spec =#{spec},name= #{name} where id = #{id}")
    int editTemp(MallGoodsTemplate mallGoodsTemplate);
    @Delete("delete from mall_goods_template where id = #{id}")
    int delTemp(MallGoodsTemplate mallGoodsTemplate);
    @Select("select * from mall_goods_template where id=#{id}")
    public MallGoodsTemplate findById(String id);
    @Select("select * from mall_goods_template")
    List<MallGoodsTemplate> findAll();
}
